from django.db import models

from django.utils import timezone

from User.models import User


class Friend(models.Model):
    mail = models.CharField(max_length=254, null=True, blank=True, verbose_name="用户账号")
    friendMail = models.CharField(max_length=254, null=True, blank=True, verbose_name="好友账号")
    remark = models.CharField(max_length=254, default="", verbose_name="备注好友名字")
    createTime = models.DateTimeField(default=timezone.now, verbose_name='创建时间', null=False, blank=False)
    friendInfo = models.ForeignKey(to=User, on_delete=models.SET("deleted"), default=None, verbose_name="好友的信息")  # 删消息啥也不做